#include "FoGGEDEF.h"
#include "GVRotator.h"



namespace _FOGGE_
{
	namespace _GDB_
	{
		GVRotator::GVRotator(::_FO_GDB::GVContainer* ptrGVContainer,::_FO_UTIL::Name name)
			:GV(ptrGVContainer,name,::_FO_UTIL::Name(__T("Rotator")))
		{
		}

		GVRotator::~GVRotator(void)
		{
		}

		const ::_FO_UTIL_MATH::Rotator& GVRotator::GetValue()
		{
			return m_rotValue;
		}
		void GVRotator::SetValue(const ::_FO_UTIL_MATH::Rotator& value)
		{
			static TCHAR tempv[1024];
			_stprintf_s(tempv,1024,__T("(%f,%f,%f"),value.m_fYaw,value.m_fPitch,value.m_fRoll);
			Set(tempv);
		}

		void GVRotator::ValueUpdated()
		{
			//convert value;
			_stscanf_s(m_strValue.c_str(),__T("(%f,%f,%f"),m_rotValue.m_fYaw,m_rotValue.m_fPitch,m_rotValue.m_fRoll);
		}
	}
}